           package com.java.diagnostics.visualizer.impl.templates;
           
           import com.java.diagnostics.visualizer.impl.util.Messages;
           import java.io.InputStream;
           import java.text.MessageFormat;
           
           public class ResourceTemplate extends Template
           {
             private static final String TO_STRING_FORMAT = "Template: [{0} (resource from class {1})]";
             private static final Class clazz = TemplateList.class;
             private String resourceName;
           
             public ResourceTemplate()
             {
             }
           
             public ResourceTemplate(String name, String resource)
             {
               super(name);
           
               this.resourceName = (resource + ".epf");
             }
           
             protected InputStream getStream()
             {
               InputStream stream = null;
               stream = clazz.getResourceAsStream(this.resourceName);
               return stream;
             }
           
             public String toString() {
               return MessageFormat.format("Template: [{0} (resource from class {1})]", new Object[] { this.name, 
                 clazz });
             }
           
             public void setName(String name)
             {
               super.setName(name);
             }
           
             public String getResourceName()
             {
               return this.resourceName;
             }
           
             public void setResourceName(String resourceName)
             {
               this.resourceName = resourceName;
             }
           
             public String getDisplayDescription() {
               return Messages.getString(this.description);
             }
           
             public String getDisplayName() {
               return Messages.getString(this.name);
             }
           }

